import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
// 引入持久化插件
import PluginState from 'pinia-plugin-persistedstate'

// 引入 ant-design-vue
import AntD from 'ant-design-vue'
import 'ant-design-vue/dist/antd.less'

// 引入权限配置
import '@/permission.js'
import Icons from '@/components/Icons'

const app = createApp(App)
const piniaApp = createPinia()
piniaApp.use(PluginState) // 注册持久化插件

app.use(piniaApp) // 注册全局组件
app.use(createPinia())
app.use(router)
app.use(AntD)
app.use(Icons)

app.mount('#app')
